package com.zzh.Stringappend;

/**
 * @author 张占恒.
 * @date 2020/8/11.
 * @time 19:55.
 */
public class Stringappend_Demo {
    public static void main(String[] args) {
        //text1();
        //text2();
        //text3();
        //text4();
        text5();
    }
    public static void text1 () {
        String s1 = new String("子牙真帅");
        System.out.println(s1);
    }
    public static void text2() {
        String s1 = new String("11");
        System.out.println(s1);
    }
    public static void text3() {
        String s1 = new String("11");
        String s2 = new String("22");
        System.out.println(s1+s2);
    }
    public static void text4() {
        String s2 = "子牙" + "子牙";
        System.out.println(s2);
    }
    public static void text5() {
        String s2 = "子牙" + new String("真帅");
        System.out.println(s2);
    }
}
